<?php
$arrData    = isset($this->arrData[$this->arrLeague[0]['LeagueID']]['tableRanking'])?$this->arrData[$this->arrLeague[0]['LeagueID']]['tableRanking']:null;
$seasonId   = isset($this->arrData[$this->arrLeague[0]['LeagueID']]['seasonID'])?$this->arrData[$this->arrLeague[0]['LeagueID']]['seasonID']:SEASON_ID;
$leagueId   = isset($this->arrData[$this->arrLeague[0]['LeagueID']]['leagueID'])?$this->arrData[$this->arrLeague[0]['LeagueID']]['leagueID']:LEAGUE_ID;
if ( !empty($arrData) && is_array($arrData) )
{
    $arrData    = TeamSeason::getInstance()->getRankingEuro2012($seasonId, $leagueId, $arrData);
?>
<div class="box_col_300 box_width_common left" id="box_bxh_bongda">
    <div class="txt_title_box">Bảng xếp hạng Euro 2012</div>
    <div class="title_tab">
        <ul>
            <li class="start active"><a rel="tab1" href="javascript:;">Bảng A </a></li>
            <li><a rel="tab2" href="javascript:;"> Bảng B  </a></li>
            <li><a rel="tab3" href="javascript:;">Bảng C  </a></li>
            <li><a rel="tab4" href="javascript:;"> Bảng D </a></li>
        </ul>
    </div>
    <div class="content_news">
        <div style="display:block;" class="content_tab tab1">
            <table class="tb_bxh">
                <tbody>
                    <tr class="top">
                        <td class="w110">Đội bóng</td>
                        <td class="w40">Thắng</td>
                        <td class="w30">Hòa</td>
                        <td class="w30">Thua</td>
                        <td class="w60">Điểm</td>
                    </tr>
            <?php
            if(isset($arrData['group-a']['Team']) && sizeof($arrData['group-a']['Team'])>0)
            {
                $count  = 0;
                foreach ( $arrData['group-a']['Team'] as $row )
                {
                ?>
                    <tr <?php echo ($count%2==0)?'':'class="chan"';?>>
                        <td class="w110"><?php echo $row['name'];?></td>
                        <td class="w20"><?php echo $row['win'];?></td>
                        <td class="w20"><?php echo $row['drawn'];?></td>
                        <td class="w20"><?php echo $row['lost'];?></td>
                        <td class="w60"><?php echo $row['point'];?></td>
                    </tr>
                <?php
                $count++;
                }//end foreach
            }//end if
            ?>
                </tbody></table>
            <div class="txt_view_more"><a class="txt_gray" href="<?php echo BASE_URL .'/lich-thi-dau' ?>">Chi tiết bảng xếp hạng</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
        </div>
        <div style="display:none;" class="content_tab tab2">
            <table class="tb_bxh">
                <tbody>
                    <tr class="top">
                        <td class="w110">Đội bóng</td>
                        <td class="w40">Thắng</td>
                        <td class="w30">Hòa</td>
                        <td class="w30">Thua</td>
                        <td class="w60">Điểm</td>
                    </tr>
                <?php
                if(isset($arrData['group-b']['Team']) && sizeof($arrData['group-b']['Team'])>0)
                {
                    $count  = 0;
                    foreach ( $arrData['group-b']['Team'] as $row )
                    {
                    ?>
                        <tr <?php echo ($count%2==0)?'':'class="chan"';?>>
                            <td class="w110"><?php echo $row['name'];?></td>
                            <td class="w20"><?php echo $row['win'];?></td>
                            <td class="w20"><?php echo $row['drawn'];?></td>
                            <td class="w20"><?php echo $row['lost'];?></td>
                            <td class="w60"><?php echo $row['point'];?></td>
                        </tr>
                    <?php
                    $count++;
                    }//end foreach
                }//end if
                ?>
                </tbody></table>
            <div class="txt_view_more"><a class="txt_gray" href="<?php echo BASE_URL .'/lich-thi-dau' ?>">Chi tiết bảng xếp hạng</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
        </div>
        <div style="display:none;" class="content_tab tab3">
            <table class="tb_bxh">
                <tbody>
                    <tr class="top">
                        <td class="w110">Đội bóng</td>
                        <td class="w40">Thắng</td>
                        <td class="w30">Hòa</td>
                        <td class="w30">Thua</td>
                        <td class="w60">Điểm</td>
                    </tr>
                <?php
                if(isset($arrData['group-c']['Team']) && sizeof($arrData['group-c']['Team'])>0)
                {
                    $count  = 0;
                    foreach ( $arrData['group-c']['Team'] as $row )
                    {
                    ?>
                        <tr <?php echo ($count%2==0)?'':'class="chan"';?>>
                            <td class="w110"><?php echo $row['name'];?></td>
                            <td class="w20"><?php echo $row['win'];?></td>
                            <td class="w20"><?php echo $row['drawn'];?></td>
                            <td class="w20"><?php echo $row['lost'];?></td>
                            <td class="w60"><?php echo $row['point'];?></td>
                        </tr>
                    <?php
                    $count++;
                    }//end foreach
                }//end if
                ?>
                </tbody></table>
            <div class="txt_view_more"><a class="txt_gray" href="<?php echo BASE_URL .'/lich-thi-dau' ?>">Chi tiết bảng xếp hạng</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
        </div>
        <div style="display:none;" class="content_tab tab4">
            <table class="tb_bxh">
                <tbody>
                    <tr class="top">
                        <td class="w110">Đội bóng</td>
                        <td class="w40">Thắng</td>
                        <td class="w30">Hòa</td>
                        <td class="w30">Thua</td>
                        <td class="w60">Điểm</td>
                    </tr>
                <?php
                if(isset($arrData['group-c']['Team']) && sizeof($arrData['group-c']['Team'])>0)
                {
                    $count  = 0;
                    foreach ( $arrData['group-d']['Team'] as $row )
                    {
                    ?>
                        <tr <?php echo ($count%2==0)?'':'class="chan"';?>>
                            <td class="w110"><?php echo $row['name'];?></td>
                            <td class="w20"><?php echo $row['win'];?></td>
                            <td class="w20"><?php echo $row['drawn'];?></td>
                            <td class="w20"><?php echo $row['lost'];?></td>
                            <td class="w60"><?php echo $row['point'];?></td>
                        </tr>
                    <?php
                    $count++;
                    }//end foreach
                }//end if
                ?>
                </tbody></table>
            <div class="txt_view_more"><a class="txt_gray" href="<?php echo BASE_URL .'/lich-thi-dau' ?>">Chi tiết bảng xếp hạng</a> <span class="icon_portal_thethao icon_view_more">&nbsp;</span></div>
        </div>
    </div>
</div>
<?php } ?>